# -*- coding: utf-8 -*-
#!/usr/bin/python
# -*- coding: utf-8 -*-

import sys
import sqlite3
import func
import inspect
		
db=sqlite3.connect("D:\MyCodes\Delphi\DoubleColorBall\Bin\DB\DcbDB");


#sSql=format("select * from history where issue=?",(issue))
cur=db.cursor();
issue=('2012012',)
cur.execute("select * from history")

rs=cur.fetchall();
print(cur.rowcount)
for i in range(1,33):
  count=0
  for row in rs:
    for idx in range(3,8):
	  if i==row[idx]:
	    count=count+1
  print("%d: %d"% (i,count))
	  
  
cur.close();
db.close();
